import {PluginCommand} from "../Command/PluginCommand";

import {
    PluginCADToolFunctionType,
    PluginEventType,
    PluginFunctionType
} from "../../nodeApp/static/lib/crowncad-plugin-sdk-0.0.1";

class MbdCommand extends PluginCommand {
    constructor() {
        super();
    }

    // 创建镜像
    mbdCreateMirror(params){
        if(this.toolQuery){
            this.toolQuery.mbdCreateMirror(params);
        }
    }

    // 获取镜像文档列表
    mbdMirrorDocList(params, cb = () => {
    }) {
        if (this.toolQuery) {
            this.toolQuery.mbdMirrorDocumentList(params).then(res => {
                cb(res.data);
            })
        }
    }

    // 镜像文档的属性信息
    mbdMirrorDocAttribute(params, cb = () => {
    }) {
        if (this.toolQuery) {
            this.toolQuery.mbdMirrorDocAttribute(params).then(res => {
                cb(res.data);
            })
        }
    }
}

const mbdCommand = new MbdCommand();
export {mbdCommand};